import request from '@/utils/request'

// 查询批量控制列表
export function listControl(query) {
  return request({
    url: '/fj/batch_control/list',
    method: 'get',
    params: query
  })
}

// 查询批量控制详细
export function getControl(id) {
  return request({
    url: '/fj/batch_control/' + id,
    method: 'get'
  })
}

// 新增批量控制
export function addControl(data) {
  return request({
    url: '/fj/batch_control',
    method: 'post',
    data: data
  })
}

// 修改批量控制
export function updateControl(data) {
  return request({
    url: '/fj/batch_control',
    method: 'put',
    data: data
  })
}

// 删除批量控制
export function delControl(id) {
  return request({
    url: '/fj/batch_control/' + id,
    method: 'delete'
  })
}

// 风机控制
export function singleControl(data) {
  return request({
    url: '/fj/equ_control',
    method: 'post',
    data: data
  })
}

export function switchRunStatus(id) {
  return request({
    url: '/fj/equ_control',
    method: 'post',
    data: {id}
  })
}
